package com.learn.springcloud.feignparambindingconsumer.service;

import com.learn.springcloud.feignparambindingconsumer.bean.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.jws.soap.SOAPBinding;
import java.util.List;
import java.util.Map;

/**
 * @Time : 2018/8/8 19:49
 * @Version : 1.0
 */
@FeignClient(name = "feign-param-binding-provider")
public interface FeignTestClient {

    @RequestMapping(value = "/feign/quick/start/provider/say/hello1", method = RequestMethod.GET)
    String hello(@RequestParam(name = "name") String name);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello2", method = RequestMethod.GET)
    User hello(@RequestHeader(name = "name") String name, @RequestHeader(name = "age") Integer age);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello3", method = RequestMethod.POST)
    String hello(@RequestBody User user);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello4", method = RequestMethod.POST)
    User hello4(@RequestBody User user);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello5", method = RequestMethod.POST)
    List<String> hello5(@RequestBody List<String> list);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello6", method = RequestMethod.POST)
    List<User> hello6(@RequestBody List<User> users);

    @RequestMapping(value = "/feign/quick/start/provider/say/hello7", method = RequestMethod.POST)
    Map<String,List<User>> sayHello7(@RequestBody Map<String,List<User>> users);
}
